package com.wmm.service.impl;

import com.wmm.dao.MenuMapper;
import com.wmm.domain.Menu;
import com.wmm.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;
    //查询所有父子菜单信息

    @Override
    public List<Menu> findSubMenuListByPid(Integer pid) {

        return menuMapper.findSubMenuListByPid(pid);
    }

    @Override
    public List<Menu> findAllMenu() {
        return menuMapper.findAllMenu();
    }

    @Override
    public Menu findMenuById(Integer id) {
        return menuMapper.findMenuById(id);
    }

}
